class Dog{
    public String name ;
    public int age ;

    public Dog(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String toString(){
        return this.name + " " + this.age;
    }
}
public class Text {

    public static void main(String[] args) {
        Dog dog = new Dog("小黑",12);
        System.out.println(dog);
    }
}
